<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="css/details.css">
<script src="js/vue.min.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<body>
<div class="app">
    <header>
        <el-page-header @back="goBack" content="轴承详情">
        </el-page-header>
    </header>
    <div class="item">
        <img src=${bearing.imgSrc} alt="">
        <div class="info">
            <form action="OrderItemAddServlet" method="post">
                <div class="title">${bearing.type}</div>
                <div class="price">价格：￥<span name="price">${bearing.price}</span>元
                    <input type="hidden" name="price" value="${bearing.price}">
                </div>
                <div class="num">数量：
                    <button class="del">-</button>
                    <span class="num">1</span>
                    <button
                            class="add">+
                    </button>
                </div>
                <div class="desc">描述：${bearing.content}</div>
                <div class="operate">
                    <button type="submit" class="cart">加入购物车</button>
                    <div class="buy">立即购买</div>
                </div>
            </form>
        </div>
    </div>
</div>

</body>
<script>
    new Vue({
        el: '.app',
        data() {
            return {}
        }, methods: {
            goBack() {
                console.log("111")
                window.location.href = 'ShoppingServlet';
            }
        }

    })
</script>

</html>